<template>
  <div class='taskFlow-main'>
    <h2>服务使用统计</h2>
    <div class='content-menu'>
      <el-form ref="searchData" :model="searchData" label-width="90px" size="small">
        <el-form-item label="服务名称:" prop='name'>
          <el-input v-model="searchData.name" placeholder='请输入编码'></el-input>
        </el-form-item>
        <el-form-item label="筛选条件1:" label-width="120px">
          <el-select v-model="searchData.num" prop='num'>
            <el-option label="全部" value=""></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="服务类型:">
          <el-select v-model="searchData.num" prop='num'>
            <el-option label="全部" value=""></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="筛选条件2:">
          <el-select v-model="searchData.num" prop='num'>
            <el-option label="全部" value=""></el-option>
          </el-select>
        </el-form-item>
         <el-form-item label="访问统计时段:" label-width="120px">
          <el-select v-model="searchData.num" prop='num'>
            <el-option label="统计日" value=""></el-option>
          </el-select>
        </el-form-item>
        <el-form-item style='text-align:right;float:right'>
          <el-button type="primary" @click='chack' size='mini'>查询</el-button>
          <el-button @click="resetForm('searchData')" size='mini'>重置</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class='content-main'>
      <table-list :chacked='chacked'></table-list>
    </div>
  </div>
</template>

<script>
  import TableList from './components/TableList'
  export default {
    name: 'taskFlow',
    components: {
      TableList
    },
    data() {
      return {
        searchData: {
          name: '',
          num: ''
        },
        chacked: {}
      }
    },
    created() {
      this.chacked = JSON.parse(JSON.stringify(this.searchData))
    },
    methods: {
      resetForm(formName) {
        this.$refs[formName].resetFields()
      },
      chack() {
        this.chacked = JSON.parse(JSON.stringify(this.searchData))
      }
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss">
  .taskFlow-main {
    padding: 0 20px 20px 20px;
    color: #666;
    h2 {
      height: 56px;
      line-height: 56px;
      color: #333;
      font-weight: normal;
      font-size: 18px;
    }
    .content-menu {
      background: #fff;
      padding: 20px;
      height: 116px;
      .el-form {
        .el-form-item {
          width: 33.33%;
          float: left;
          .el-select {
            width: 100%;
          }
        }
      }
    }
    .content-main {
      background: #fff;
      margin-top: 20px;
      padding: 20px;
    }
  }
</style>